package com.example.chat.utils;

import lombok.Data;
import org.springframework.http.HttpStatus;

/**
 * @author pq
 * @date 2022/8/14 12:28
 * @description
 * @modified
 **/
@Data
public class ChatException extends RuntimeException{

    private String code;
    private Integer statusCode;
    private String message;

    private String raiseBy;

    public ChatException(Integer statusCode,String code,String message){
        super(message);
        this.code=code;
        this.message=message;
        this.statusCode=statusCode;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public String getMessage() {
        return message;
    }

    public String getCode() {
        return code;
    }

    public ChatException(String code, String message) {
        this(HttpStatus.OK.value(), code, message);
    }

    public ChatException(String message){
        this.message = message;
    }
}
